package com.woniu.HisHospitalizationApi;

import com.woniu.dto.HisBedDto;
import com.woniu.dto.HisHospitalRecordsDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.HisHospitalRecordsAddParam;
import com.woniu.param.HisHospitalRecordsParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        value = "his-hospitalization",
        contextId = "HisHospitalRecords")
@Api(tags = "住院的住院记录接口")
public interface HisHospitalRecordsApi {
    //-------------------关于住院记录操作-------------------

    //查询所有住院记录并分页展示
    @ApiOperation("查询所有住院记录并分页展示")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "无",
//                    value = "无",
//                    required = false,
//                    dataType = "无")
//    })
    @GetMapping("getAllHisHospitalRecords")
    public Result<PageDTO<HisHospitalRecordsDto>> getAllHisHospitalRecords();

    //查询住院记录
    @ApiOperation("根据id查询院记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "id",
//                    required = false,
//                    dataType = "arraylist")
//    })
    @PostMapping("getHisHospitalRecordsBy")
    public Result<PageDTO<HisHospitalRecordsDto>> getHisHospitalRecordsBy(@RequestBody HisHospitalRecordsParam hisHospitalRecordsParam);

    //修改住院记录
    @ApiOperation("修改住院记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisHospitalRecordsParam",
//                    value = "住院记录对象",
//                    required = false,
//                    dataType = "HisHospitalRecordsParam")
//    })
    @PutMapping("updateHisHospitalRecords")
    public Result<HisHospitalRecordsDto> updateHisHospitalRecords(@RequestBody HisHospitalRecordsParam hisHospitalRecordsParam);


    //增加住院记录
    @ApiOperation("增加住院记录")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisHospitalRecordsParam",
//                    value = "住院记录对象",
//                    required = false,
//                    dataType = "HisHospitalRecordsParam")
//    })
    @PostMapping("addHisHospitalRecord")
    public Result<HisHospitalRecordsDto> addHisHospitalRecords(@RequestBody HisHospitalRecordsAddParam hisHospitalRecordsAddParam);

}
